<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Produto</title>
        <LINK REL="stylesheet" TYPE="text/css" MEDIA="all" HREF="css/default.css">
    </head>
    <body>
        
    <f:view>
        <h:form>            
            <h:dataTable value="#{produto.produtos}" var="item"
                         border="0" cellspacing="0" cellpadding="1"
                         rowClasses="tab_odd_row,tab_even_row">                                                    
                <h:column>
                    <h:outputText value="#{item.nome}"/>
                </h:column>
                  
                <h:column>
                    <h:outputText value="#{item.idMedida.nome}"/>
                </h:column>                   
                <h:column>
                    <h:commandLink action="#{produto.showDetails(item)}"
                                   value="Edit"/>
                </h:column>
            </h:dataTable>
                    
                    <h:commandLink action="#{produto.newProduto}" value="Create"/>
        </h:form>
    </f:view>

        
    </body>
</html>
